home *** CD-ROM | disk | FTP | other *** search
- Path: news.iadfw.net!usenet
- From: Mark Nelson <markn@airmail.net>
- Newsgroups: comp.lang.c++
- Subject: Re: DLL's & VB
- Date: Sat, 23 Mar 1996 20:17:35 -0600
- Organization: customer of Internet America
- Message-ID: <3154B0BF.5683@airmail.net>
- References: <4j26ov$ks0$1@mhafc.production.compuserve.com>
- NNTP-Posting-Host: dal12-09.ppp.iadfw.net
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0GoldB2 (Win95; I)
-
- Ed Lopez wrote:
- >
- > I want to create a DLL that may be used by a VB application. I'm
- > using VC++ 1.5. My question is can I write a CLASS that is
- > exported and access it from a VB(ver 3.0) program or can I only
- > use exported FUNCTIONS when dealing with VB. Thanks Ed.
-
- VB 3.0 doesn't really understand the concept of a C++ class. I've used
- C++ classes with VB by creating objects and returning pointers to them
- via 32 bit "handles." My DLL knows that the handle is actually a pointer
- to an object, but the VB program doesn't have to be aware of this.
-
- Member functions are then invoked by calling exported C functions with the
- handle as a parameter. Once inside the DLL, the handle is cast to the
- appropriate pointer type and the member function can be called.
-
- Mark Nelson
- http://web2.airmail.net/markn
-